package com.echo.fm.content.systemAction;

import java.util.List;

import org.hibernate.criterion.Criterion;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import com.echo.fm.content.systemAction.model.SystemAction;
import com.echo.util.ErrorException;

@Service("systemActionService")
public class DefaultSystemActionServiceImpl implements ISystemActionService {
	@Autowired
	@Qualifier("systemActionPersistence")
	ISystemActionPersistence systemActionPersistence;

	public ISystemActionPersistence getSystemActionPersistence() {
		return systemActionPersistence;
	}

	public void setSystemActionPersistence(ISystemActionPersistence systemActionPersistence) {
		this.systemActionPersistence = systemActionPersistence;
	}

	public void deleteSystyeAction(SystemAction systemAction) throws ErrorException {
		systemActionPersistence.deleteSystemAction(systemAction);

	}

	public void updateSystemAction(SystemAction systemAction) throws ErrorException {
		systemActionPersistence.updateSystemAction(systemAction);
	}

	public SystemAction searchSystemActionById(String id) throws ErrorException {
		return systemActionPersistence.searchSystemActionById(id);
	}

	public List<SystemAction> searchSystemActionList(List<Criterion> criterions) throws ErrorException {
		return systemActionPersistence.searchSystemActionList(criterions);
	}

	public List<SystemAction> pagesSystemActionList(List<Criterion> criterions) throws ErrorException {
		return systemActionPersistence.pagesSystemActionList(criterions);
	}

	public List<SystemAction> pagesSystemActionList(List<Criterion> criterions, int firstResult) throws ErrorException {
		return systemActionPersistence.pagesSystemActionList(criterions, firstResult);
	}

	public int pageSystemActionCount(List<Criterion> criterions) throws ErrorException {
		return systemActionPersistence.pageSystemActionCount(criterions);
	}

	public void createSystemAction(SystemAction systemAction) throws ErrorException {
		systemActionPersistence.createSystemAction(systemAction);

	}

}
